//
//  ZZPUtils.h
//  TeachingAssistants
//
//  Created by 张志鹏 on 16/10/20.
//  Copyright © 2016年 ZhangZhipeng. All rights reserved.
//

#import <Foundation/Foundation.h>

//#import <ATAuthSDK/ATAuthSDK.h>


typedef void(^ResultBlock)(BOOL result);

@interface ZZPUtils : NSObject
+(NSString*)handleNullString:(id)m_result;
+ (UIViewController *)activityViewController;
+ (void)showWarning:(NSString *)message;

/**
 *  根据文件名删除沙盒中的归档对象
 */
//+ (void)removeObjectByFileName:(NSString*)fileName;

/**
 *  存储用户偏好设置 到 NSUserDefults
 */
+ (void)saveUserDefultsData:(id)data forKey:(NSString*)key;

/**
 *  读取用户偏好设置
 */
+(id)readUserDefultsDataForKey:(NSString*)key;

/**
 *  删除用户偏好设置
 */
+(void)removeUserDefultsDataForkey:(NSString*)key;


// 获取时间戳
+(NSString *)getTimeStamp;


/**
 *  判断字符串是否为空
 */
+ (BOOL)isBlankString:(NSString *)string;




+ (void)showWarning:(NSString *)message;



+ (NSMutableDictionary *)delteNullDataWithDic:(NSDictionary *)dataDic;





+ (void)setBool:(NSString *)keyname andValue:(BOOL)value;
+(BOOL)getBool:(NSString *)keyname;



+ (BOOL)isPhotographer;
+ (NSString *)updateTimeStamp:(NSString *)stmp;





//添加阴影
+ (void)addShowToView:(UIView *)view;


//打电话
+(void)telephoneForAppWithNum:(NSString *)telephone;


//删除线
+ (void)deleteLineLabel:(UILabel *)oldPriceLabel;

//行间距
+ (void)setLineSpace:(CGFloat)lineSpace withText:(NSString *)text inLabel:(UILabel *)label;


+ (NSString *)updateTimeStamp:(NSString *)stmp andType:(NSString *)type;

+(id)jsonToObject:(NSString *)json;


+ (void)showAlertViewWithView:(UIView *)view andController:(UIViewController *)controller;
+ (void)showActionSheetWithView:(UIView *)view andController:(UIViewController *)controller;


+(void)timeCuterWithSuper:(UIButton *)codeBtn AndoverBlock:(void (^)())runLoperBlock;

+ (void)cancelTimer;

+(NSString *)getTimeFromShortTimeDa:(NSDate *)date;

+ (void)presentLoginViewController:(UIViewController *)con;



+ (NSMutableString *)sortString:(NSMutableString *)srcStr;



+ (void)aliLoginWithController:(UIViewController *)con andResulBlock:(ResultBlock)reslultBolck;

+ (void)loginToRongCloud;

+ (NSString *)dataToJasonString:(id)theData;
+ (id)toArrayOrNSDictionary:(NSString *)str;

//获取当前时间戳 （以毫秒为单位）
+(NSString *)getNowTimeTimestamp;


+ (NSString *)numToString:(NSInteger)inter;


@end
